#include <iostream>
using namespace std;

/**
 * 运算符重载：：赋值运算符重载
*/

class Test{
    public:
        int num = 10;

        void operator=(const Test &t){
            this->num = t.num;
        };
};

int main(){
    Test t1;
    Test t2;

    // t1.num:10
    cout << "t1.num:" << t1.num << endl;

    t2.num = 66;
    t1 = t2;
    // t1.num:66
    cout << "t1.num:" << t1.num << endl;
}